export default {
  data() {
    return {
      titleCustomerIcon:
        'https://zt.crm1001.com/web/apps/data_center/pageIcon.png'
    };
  },
  methods: {
    getPageIcon() {
      const iconLink = document.getElementById('pageIconLink');
      iconLink.href = this.titleCustomerIcon;
      iconLink.setAttribute('href', iconLink.href + '?' + new Date().getTime());
    }
  },
  mounted() {
    const extra = localStorage.getItem('extra');
    if (extra) {
      const extraObj = JSON.parse(extra);
      if (extraObj.icon) {
        this.titleCustomerIcon = extraObj.icon;
      }
    }
    this.getPageIcon();
  }
};
